package com.gome.rb.job.jobservice;

import com.gome.rb.entity.RefundBankBean;

public abstract class RefundTaskService {
	
	
	
	public abstract void doTaskService(RefundBankBean bean);
	
	
	public void refundTask(RefundBankBean bean) {
		try {
			// 更新任务状态为正在发送
			//this.refundService.updateRefundTaskState(RefundBankBean.TASKSTATE_SENDING,task);
			// 发起退款
			try {
				this.doTaskService(bean);
			} catch (Exception e) {
				String error = "退款发送失败";
				//this.refundTimeoutHandle(bean, error);
				return;
			}
			// 更新任务状为发送成功
			//this.refundService.updateRefundTaskState(RefundBankBean.TASKSTATE_SENDFINISH,task);
		} catch (Exception e) {
			// 更新任务状为处理异常
//			try {
//				this.refundService.updateRefundTaskState(RefundBankBean.TASKSTATE_EXCEPTION,task);
//			} catch (Exception e1) {
//				e1.printStackTrace();
//			}
		}
	}
	
	
	
}
